//
//  LXJControlViewController.m
//  HMSport
//
//  Created by 李旭杰 on 2017/4/23.
//  Copyright © 2017年 LiXujie. All rights reserved.
//

#import "LXJControlViewController.h"
#import "LXJTrackViewController.h"
#import "LXJTrackViewController.h"

@interface LXJControlViewController ()
//轨迹控制器
@property (nonatomic, strong) LXJTrackViewController *trackVc;
@end

@implementation LXJControlViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    [self.navigationController.navigationBar setHidden:YES];
    
    //一开始运动,就应该创建trackVc和mapVc,并且保证这里两个控制器不被释放
    self.trackVc = [[LXJTrackViewController alloc] init];
    //传递轨迹模型
    self.trackVc.track = self.track;
}

// 展示轨迹跟踪控制器
- (IBAction)showMapAction:(UIButton *)sender {
   
    [self presentViewController:self.trackVc animated:YES completion:nil];
}

// 点击返回上级
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    
    [self dismissViewControllerAnimated:YES completion:nil];
}

@end
